﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace CsharpWpfManual
{
    /// <summary>
    /// Window1.xaml 的交互逻辑
    /// </summary>
    public partial class Window1 : Window
    {
        public Window1()
        {
            InitializeComponent();

            Matrix matrix = new Matrix();
            Point p = new Point(50, 200);
            matrix.RotateAt(30, 200, 200);
            
            arc.Point = matrix.Transform(p);

            //下一段蓝色圆弧的起点。仍然是圆心200，200.
            //第一个圆弧点，是上一段红色圆弧的终点.  第一个圆弧点旋转45度，得到第二个圆弧点

            Point StartPoint = arc.Point;
            matrix = new Matrix();         
            matrix.RotateAt(45, 200, 200);
            Point EndPoint = matrix.Transform(StartPoint);

            bluePathFigure.Segments.Add(new LineSegment(StartPoint,true));
            bluePathFigure.Segments.Add(new ArcSegment(EndPoint,new Size(150,150),0,false,SweepDirection.Clockwise,true));


        }
    }
}
